package com.hjh.mode.composite;

public class Client {
    public static void main(String[] args) {
        WindowComponent winForm = new Composite("WinForm(WINDOW窗口)");

        WindowComponent picture = new LeafComp("Pictgure(LOGO图片)");
        winForm.addChild(picture);

        WindowComponent buttonLogin = new LeafComp("Button(登录)");
        winForm.addChild(buttonLogin);

        WindowComponent buttonRegister = new LeafComp("Button(注册)");
        winForm.addChild(buttonRegister);

        WindowComponent frame = new Composite("Frame(FRAME)");
        winForm.addChild(frame);


        WindowComponent labelUserName = new LeafComp("lable(用户名)");
        frame.addChild(labelUserName);

        WindowComponent textBox = new LeafComp("TextBox(文本框)");
        frame.addChild(textBox);

        WindowComponent labePwd = new LeafComp("lable(密码)");
        frame.addChild(labePwd);

        WindowComponent pwdBox = new LeafComp("PasswordBox(密码框)");
        frame.addChild(pwdBox);

        WindowComponent checkBoxs = new LeafComp("CheckBox(复选框)");
        frame.addChild(checkBoxs);

        WindowComponent checkBoxForName = new LeafComp("TextBox(记住用户名)");
        frame.addChild(checkBoxForName);

        WindowComponent linkeLabel = new LeafComp("LinkLable(忘记密码)");
        frame.addChild(linkeLabel);


        winForm.print();

    }
}
